<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="layout/admin">
<head>
    <title>Add Topic</title>
</head>
<body>
<main layout:fragment="content">
    <article class="container" style="padding: 3% 0 2%;">
        <header class="row">
            <div class="col s12">
                <blockquote class="flow-text left" th:text="|创建新的活动: |">Add CardActivity</blockquote>
            </div>
        </header>
        <section>

            <form th:action="@{'/addCardActivity1'}" method="post" enctype="multipart/form-data" >
                <div class="row">
                    <div class="col s12 ">
                        <label> 集卡活动标题
                            <input type="text" name="title" minlength="0" maxlength="10" data-length="10" placeholder="请输入标题" required="required"/>
                        </label>
                        <label> 起始时间
                            <input type="date" name="startTime" required="required"/>
                        </label>
                        <label> 结束时间
                            <input type="date" name="endTime" required="required"/>
                        </label>
                        <label> 集卡规则说明
                            <input type="text" name="collectionRule"  placeholder="请输入集卡活动规则说明"/>
                        </label>
                        <label> 第一张卡片刮中几率
                            <input type="number" step="0.01" name="probability1" placeholder="请输入数字" required="required"/>
                        </label>
                        <label> 第二张卡片刮中几率
                            <input type="number" step="0.01" name="probability2" placeholder="请输入数字" required="required"/>
                        </label>
                        <label> 第三张卡片刮中几率
                            <input type="number" step="0.01" name="probability3" placeholder="请输入数字" required="required"/>
                        </label>
                        <label> 第四张卡片刮中几率
                            <input type="number" step="0.01" name="probability4" placeholder="请输入数字" required="required"/>
                        </label>
                        <label> 第五张卡片刮中几率
                            <input type="number" step="0.01" name="probability5" placeholder="请输入数字" required="required"/>
                        </label>
                    </div>
                </div>

                <div class="file-field input-field">
                    <div class="btn">
                        <span>选择图片1</span><input type="file" name="cardPicture1"></input>
                    </div>
                    <div class="file-path-wrapper">
                        <input class="file-path validate" type="text"></input>
                    </div>
                </div>

                <div class="file-field input-field">
                    <div class="btn">
                        <span>选择图片2</span><input type="file" name="cardPicture2"></input>
                    </div>
                    <div class="file-path-wrapper">
                        <input class="file-path validate" type="text"></input>
                    </div>
                </div>

                <div class="file-field input-field">
                    <div class="btn">
                        <span>选择图片3</span><input type="file" name="cardPicture3"></input>
                    </div>
                    <div class="file-path-wrapper">
                        <input class="file-path validate" type="text"></input>
                    </div>
                </div>

                <div class="file-field input-field">
                    <div class="btn">
                        <span>选择图片4</span><input type="file" name="cardPicture4"></input>
                    </div>
                    <div class="file-path-wrapper">
                        <input class="file-path validate" type="text"></input>
                    </div>
                </div>

                <div class="file-field input-field">
                    <div class="btn">
                        <span>选择图片5</span><input type="file" name="cardPicture5"></input>
                    </div>
                    <div class="file-path-wrapper">
                        <input class="file-path validate" type="text"></input>
                    </div>
                </div>

                <div class="file-field input-field">
                    <div class="btn">
                        <span>选择集卡活动宣传图片</span><input type="file" name="publicityPicture"></input>
                    </div>
                    <div class="file-path-wrapper">
                        <input class="file-path validate" type="text"></input>
                    </div>
                </div>

                <input type="hidden" name="id_user" />
                <div class="row">
                    <div class="col s12 center">
                        <button class="btn waves-effect waves-light btn-large" type="submit" name="add">发表</button>
                    </div>
                </div>

                <div class="col s12" th:if="${error != null}">
                    <p class="center" th:text="${error}"></p>
                </div>
            </form>
        </section>
    </article>
</main>
</body>
</html>